<?php
$module		    = strtolower(gpc_getStringGet("module","index"));
$act			= strtolower(gpc_getStringGet("opt","index"));
$id    			= gpc_getIntGet("id");
$idP    		= gpc_getIntGet("idP");
$code  			= gpc_getStringGet("code");
$status         = gpc_getIntGet('status',-1);
$loc            = gpc_getIntGet('loc',-1);
$type  			= gpc_getStringGet("type");
$child 			= gpc_getStringGet("child");
$search		    = gpc_getStringGet("search");
$page  			= gpc_getIntGet("page",1);
$pinpagep       = gpc_getIntGet("pip");

$actPost        = gpc_getStringPost("opt");
$AjaxOpt        = gpc_getStringPost("AjaxOpt");

$ip             = $_SERVER['REMOTE_ADDR'];
$AjaxFrame      = gpc_getBoolPost("AjaxFrame") || gpc_getBoolGet("AjaxFrame")||gpc_getBoolPost("ajax");
$msg_alert      = gpc_getSession("Msg_Alert_Redirect");

$url_Back       = '?module='.$module;
$pagetr         = (strpos($_SERVER['HTTP_REFERER'],$_SERVER['REQUEST_URI'])===false)? $_SERVER['HTTP_REFERER']: '';
$postdate       = date("Y-m-d");
$titleadmin     = $module .' => '.$act;

$popup          = null;
$toolbar        = null;
$toolbarTab     = null;

if($msg_alert)
{
    gpc_removeSession("Msg_Alert_Redirect");
}

//load rows in 1 page:
$posts_per_page_post= gpc_getCookie("RowsInPageAdmin",$config_page_posts);
if($pinpagep>=$config_page_posts)
{
	gpc_setCookie("RowsInPageAdmin",$pinpagep,time()+9999*999,0);
	header("location: ?".preg_replace("/(&pip=)([0-9]*)/i","",$_SERVER['QUERY_STRING']));
	exit;
}
if($act=="index" && !empty($module) && $module!="index" && $AjaxFrame!==true && $popup!==true)
{
    gpc_setSession('UrlBack',$_SERVER['REQUEST_URI']);
}
//set timezone
@date_default_timezone_set(@getConfig('TimeZoneDefault'));


?>